package air2.totc;

import air2.totc.common.decoderSMS;
import air2.totc.common.envoyerSMS;
import air2.totc.testing.*;
import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Contacts;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.Toast;

/**
 * Activit� principale
 * @author tmz
 *
 */
public class totc extends Activity {
    /** Called when the activity is first created. */
    private Button envoyerSMS;
    private Button lireSMS;
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        envoyerSMS = (Button) findViewById(R.id.envoyerSmS);
        envoyerSMS.setOnClickListener(new View.OnClickListener() {			
			public void onClick(View v) {
				Intent encode = new Intent(v.getContext(),envoyerSMS.class);
				startActivity(encode);
			}
		});
        lireSMS = (Button) findViewById(R.id.lireSMS);
        lireSMS.setOnClickListener(new View.OnClickListener() {			
			public void onClick(View v) {
	  			Intent decode = new Intent(v.getContext(), decoderSMS.class);
	  			
	   		  	//On affecte � l'Intent le Bundle que l'on a cr��
	  			//On d�marre l'autre Activity
	  			startActivity(decode);
			}
		});
    	//Toast.makeText(this,TestProject.runTest(),Toast.LENGTH_LONG).show(); 
    }

}